﻿@model List<IGrouping<DateTime, Smart_Archives.Entity.SecurityDeviceRecord>>
@{
    ViewData["Title"] = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 馆内抓拍 <span class="c-gray en">&gt;</span> 列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

    <div class="text-c">
        <form id="searchForm" action="/snap/index" method="get">
            <input type="hidden" name="id" value="@ViewBag.deviceId" />
            日期范围：
            <input type="text" name="minDate" onfocus="WdatePicker({ maxDate: '#F{$dp.$D(\'logmax\')||\'%y-%M-%d\'}' })" id="logmin" class="input-text Wdate" style="width: 120px;" AUTOCOMPLETE="off">
            -
            <input type="text" name="maxDate" onfocus="WdatePicker({ minDate: '#F{$dp.$D(\'logmin\')}', maxDate: '%y-%M-%d' })" id="logmax" class="input-text Wdate" style="width: 120px;" AUTOCOMPLETE="off">
            @*<input type="text" name="" id="" placeholder=" 图片名称" style="width:250px" class="input-text">*@
            <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        @*<span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius">
                    <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                </a>
                <a class="btn btn-primary radius" onclick="picture_add('添加图片', 'picture-add.html')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加图片</a>
            </span>*@
        <span class="r">共有数据：<strong>@ViewBag.itemCount</strong> 条</span>
    </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
                <tr class="text-c">
                    @* <th width="40"><input name="" type="checkbox" value=""></th> *@
                    <th width="100">日期</th>
                    <th width="150">摄像头名称</th>
                    <th width="150">摄像头位置</th>
                    @*<th>图片名称</th>*@
                    @*<th width="150">日期</th>
                        <th width="150">更新时间</th>
                        <th width="60">发布状态</th>
                        <th width="100">操作</th>*@
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr class="text-c" style="cursor:pointer" onClick="picture_edit('抓拍列表', '/snap/snapList?date=@item.Key&deviceid=@ViewBag.deviceId')">
                        @* <td><input name="" type="checkbox" value=""></td> *@
                        <td>@item.Key.ToString("yyyy-MM-dd")</td>
                        <td>@ViewBag.deviceName</td>
                        <td>@ViewBag.location</td>
                        @*<td><a href="javascript:;" onClick="picture_edit('图库编辑','picture-show.html','10001')"><img width="210" class="picture-thumb" src="temp/200x150.jpg"></a></td>
                            <td class="text-l"><a class="maincolor" href="javascript:;" onClick="picture_edit('图库编辑','picture-show.html','10001')">现代简约 白色 餐厅</a></td>
                            <td class="text-c">标签</td>
                            <td>2014-6-11 11:11:42</td>
                            <td class="td-status"><span class="label label-success radius">已发布</span></td>
                            <td class="td-manage"><a style="text-decoration:none" onClick="picture_stop(this,'10001')" href="javascript:;" title="下架"><i class="Hui-iconfont">&#xe6de;</i></a> <a style="text-decoration:none" class="ml-5" onClick="picture_edit('图库编辑','picture-add.html','10001')" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> <a style="text-decoration:none" class="ml-5" onClick="picture_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>*@
                    </tr>
                }

            </tbody>
        </table>
        <div id="adminPage" style="float: right;margin-top: 20px"></div>
        <div style="clear:both;"></div>
    </div>
</div>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
    //$('.table-sort').dataTable({
    //    "aaSorting": [[1, "desc"]],//默认第几个排序
    //    "bStateSave": true,//状态保存
    //    "aoColumnDefs": [
    //        //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
    //        { "orderable": false, "aTargets": [0, 8] }// 制定列不参与排序
    //    ]
    //});
    sf_page('adminPage', @ViewBag.pageCount);


    /*图片-编辑*/
    function picture_edit(title, url) {
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    }
</script>